
{% if page.category.child_groups %}
  <div class='docs-article__sidebar'>

    <div class='docs-article__sidebar-title'>
      <a href='{{ site.baseurl }}{{ page.category.url | escape }}'>{{ page.category.title | escape }}</a>
    </div>

    <ul>
      {% for child_group in page.category.child_groups %}
        <li>
          {% if child_group.is_related %}
            <h3 class='docs-article__sidebar-group-title'>See Also</h3>
          {% elsif child_group.title %}
            <h3 class='docs-article__sidebar-group-title'>{{ child_group.title | escape }}</h3>
          {% endif %}
          <ul>
            {% for article in child_group.children %}
              <li class='docs-article__sidebar-item {%
                if article.slug == page.slug
              %}docs-article__sidebar-item--selected{%
                endif
              %} {% if child_group.is_related
              %}docs-article__sidebar-item--related{%
                endif
              %}'>
                <a href='{{ site.baseurl }}{{ article.url | escape }}'>
                  <span>{{ article.title | escape }}</span>
                </a>
              </li>
            {% endfor %}
          </ul>
        </li>
      {% endfor %}
    </ul>
  </div>
{% endif %}
